//
//  DestinationDataModel.m
//  AroundTheWorld
//
//  Created by dllo on 16/5/18.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "DestinationDataModel.h"
#import "countryModel.h"

@implementation DestinationDataModel

- (void) setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.countryID = value;
    }
}

- (void)setHot_country:(NSMutableArray *)hot_country
{
    _hot_country = hot_country;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _hot_country) {
       countryModel *model = [[countryModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _hot_country = [NSMutableArray arrayWithArray:array];
}

- (void)setCountry:(NSMutableArray *)country
{
    _country = country;
    NSMutableArray *array = [NSMutableArray array];
    for (NSDictionary *dic in _country) {
        countryModel *model = [[countryModel alloc] init];
        [model setValuesForKeysWithDictionary:dic];
        [array addObject:model];
    }
    _country = [NSMutableArray arrayWithArray:array];
}

@end
